package org.danger.t7.db.base;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;

/**
 * .
 *
 * @param <T> .
 */
public interface BaseMapper2<T> extends BaseMapper<T> {

    /**
     * .
     *
     * @return .
     */
    default QueryWrapper<T> wrapper() {
        return Wrappers.query();
    }

    /**
     * .
     *
     * @return .
     */
    default LambdaQueryWrapper<T> lambdaWrapper() {
        return Wrappers.lambdaQuery();
    }

    /**
     * 便捷LambdaQueryWrapper获取，少写一行泛型代码
     *
     * @return .
     */
    default LambdaUpdateWrapper<T> lambdaUpdateWrapper() {
        return Wrappers.lambdaUpdate();
    }
}
